#include "mainwindow.h"
#include "tab.hpp"
#include "textfolding.h"
#include "ui_mainwindow.h"
#include "vtextedit.h"

#include <QHBoxLayout>
#include <QScrollBar>
#include "editorindicatorsborder.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    auto editor = new tab(parent);
    editor->setSizePolicy(QSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding));
    int index = ui->tabWidget->addTab(editor, "");
    ui->tabWidget->setCurrentIndex(index);
    ui->tabWidget->setTabToolTip(index, "");
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::resizeEvent(QResizeEvent *event)
{
    int w = event->size().width();
    int h = event->size().height();
    ui->tabWidget->resize(w, h);
    qDebug() << "w:" << w << " h:" << h;
}

